package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.logi.sys.domain.LogiCarrierCarDriver;
import com.piggy.common.core.web.page.BaseMapperPlus;

import java.util.List;

/**
 * 承运商车辆司机Mapper接口
 *
 * @author zito
 * @date 2023-08-12
 */
public interface LogiCarrierCarDriverMapper extends BaseMapperPlus<LogiCarrierCarDriver> {

    default List<LogiCarrierCarDriver> selectByCarIds(List<Long> carIds) {
        return selectList(Wrappers.<LogiCarrierCarDriver>lambdaQuery().in(LogiCarrierCarDriver::getCarId, carIds));
    }

    default void removeByCarId(Long carId) {
        delete(Wrappers.<LogiCarrierCarDriver>lambdaQuery().eq(LogiCarrierCarDriver::getCarId, carId));
    }
}
